﻿/*
 * Created by SharpDevelop.
 * User: Heikki
 * Date: 22.11.2007
 * Time: 19:04
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Drawing;
using System.Windows.Forms;

namespace notebooklet
{
	/// <summary>
	/// Description of ApplicationTodo.
	/// </summary>
	public partial class ApplicationTodo : Form, IApp
	{
		private Controller ctrl;
		private Todos todos;
		
		#region Constructor, IApp methods
		public ApplicationTodo(Controller ctrl)
		{
			InitializeComponent();
			InitializeComponent();
			this.ctrl = ctrl;
			load();
		}

		public bool load() {
			this.todos = new Todos(this.ctrl.UserDb);
			return true;
		}
		
		public bool save() {
			return this.todos.save();
		}
		
		public Panel MainPanel {
			get {
				// this.TableMain.Controls.Add(this.FilterList.MainPanel, 0, 0);
				return this.panelMain;
			}
		}
		
		public IDataCtrl<IDataObj> IntCtrl {
			get { return (IDataCtrl<IDataObj>)this.todos; }
		}
		#endregion //Constructor, IApp methods

	}
}
